#ifndef _SERIALPORTAPI_H
#define _SERIALPORTAPI_H

void Set_SerialPort(char *p);

int PurgeComm(HANDLE icdev,int a);

int  ReadChar(HANDLE icdev,uchar *a);
int  ReceiveST(HANDLE icdev,uchar *a);
int  WriteChar(HANDLE icdev,char a);

HANDLE OpenComm(int comm,long baud);

int ReadChar_N(HANDLE icdev,uchar *rlen,uchar *rebuf);

int  WriteChar_N(HANDLE icdev,int len,uchar *sendbuf);

int CloseComm(HANDLE icdev);


void logHexstring(int len,char *buf);

int RMUHFRFID_Send_CMD_RFID(int handlers, uchar *payload, uint payload_size);
int RMUHFRFID_Resp_CMD_RFID(int handlers, uchar *inbuf,uint  *inlen, int timer_out);
#endif
